<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <!-- <link rel="stylesheet" href="../../node_modules/font-awesome/css/font-awesome.min.css"> -->
  <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <style>
    .fa.fa-arrows {
      cursor: pointer;
    }
  </style>
</head>

<body>
  <ul id="items">
    <li>item 1</li>
    <li>item 2</li>
    <li>item 3</li>
  </ul>

  <hr>

  <ul id="items2">
    <li>
      <i class="fa fa-arrows item-move"></i>
      item 1
    </li>
    <li>
      <i class="fa fa-arrows item-move"></i>
      item 2
    </li>
    <li>
      <i class="fa fa-arrows item-move"></i>
      item 3
    </li>
  </ul>

  <!-- <script src="../../node_modules/sortablejs/Sortable.min.js"></script> -->
  <script src="https://cdn.bootcdn.net/ajax/libs/Sortable/1.13.0/Sortable.min.js"></script>
  <script>
    // 最简单的一个实现
    const els = document.querySelector("#items");
    Sortable.create(els)

    // 指定触发移动的目标，指定配置项
    const els2 = document.querySelector("#items2");
    Sortable.create(els2, {
      handle: '.item-move',
      animation: 150
    })
  </script>

</body>

</html>